home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / wp / esee2.0.lha / ESEE2 / GoldED / Tools / GEDScan / OBJECT.e next >
Encoding:
Text File  |  1994-10-22  |  1.6 KB  |  77 lines

  1. -> Amiga E OBJECT scanner for GoldED's function-scanning features.
  2. -> This piece of software is part of the ESEE 2.x distribution.
  3.  
  4. -> ESEE (E Source Editor Environment) is © 1994 by Leon Woestenberg.
  5. -> Email me for comments at 'leon@stack.urc.tue.nl'.
  6.  
  7. ;OPT ASM
  8.  
  9.   MOVE.L A1,-(A7)
  10.   MOVE.L (A0),A1
  11. test_for_object:
  12.   CMP.B #79,(A1)
  13.   BEQ.S maybe_object
  14. maybe_export:
  15.   CMP.B #69,(A1)
  16.   BNE.W no_object_header
  17.   CMP.B #88,1(A1)
  18.   BNE.W no_object_header
  19.   CMP.B #80,2(A1)
  20.   BNE.W no_object_header
  21.   CMP.B #79,3(A1)
  22.   BNE.W no_object_header
  23.   CMP.B #82,4(A1)
  24.   BNE.W no_object_header
  25.   CMP.B #84,5(A1)
  26.   BNE.W no_object_header
  27.   CMP.B #32,6(A1)
  28.   BNE.W no_object_header
  29.   ADDQ.L #7,(A0)
  30.   ADDQ.L #7,A1
  31.   SUBQ.L #7,D0
  32. maybe_object:
  33.   CMP.B #79,(A1)
  34.   BNE.S no_object_header
  35.   CMP.B #66,1(A1)
  36.   BNE.S no_object_header
  37.   CMP.B #74,2(A1)
  38.   BNE.S no_object_header
  39.   CMP.B #69,3(A1)
  40.   BNE.S no_object_header
  41.   CMP.B #67,4(A1)
  42.   BNE.S no_object_header
  43.   CMP.B #84,5(A1)
  44.   BNE.S no_object_header
  45.   ADDQ.L #6,(A0)
  46.   ADDQ.L #6,A1
  47.   SUBQ.L #6,D0
  48. skip_spaces:
  49.   CMP.B #32,(A1)
  50.   BNE.S find_end_of_objectname
  51.   SUBQ.L #1,D0
  52.   ADDQ.L #1,(A0)
  53.   ADDQ.L #1,A1
  54.   JMP skip_spaces(PC)
  55. find_end_of_objectname:
  56.  
  57.   ;-> remember linelength in D1, to prevent illegal memory access
  58.   MOVE D0,D1
  59.   ;-> determine the objectname length, keep this length into D0
  60.   CLR.L D0
  61. find_space_or_eol:
  62.   CMP.B #32,(A1)
  63.   BEQ.S finished
  64.   ;-> A1 is the running pointer, and (A0) is frozen to start of objectname
  65.   ADDQ.L #1,A1
  66.   ADDQ.L #1,D0
  67.   CMP.B D0,D1
  68.   BEQ.S finished
  69.   JMP find_space_or_eol(PC)
  70. no_object_header:
  71.   CLR.L D0
  72. finished:
  73.   MOVE.L (A7)+,A1
  74.   RTS
  75.  
  76. CHAR '$VER: GoldED_OBJECT_Scanner 2.0 (22.10.94)',0
  77.